home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turnbull China Bikeride
/
Turnbull China Bikeride - Disc 2.iso
/
BARNET
/
FREENET
/
MELL
/
NETLIB00
/
NetLib
/
c
/
network
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
Text File
|
1995-03-01
|
304 b
|
17 lines
#include "arpa/inet.h"
#include "netinet/in.h"
#include "sys/byteorder.h"
/*
* Extract a network number in host byte order from a string
*/
u_long inet_network(const char *cp)
{
struct in_addr net;
/* Decode the address string */
net.s_addr = inet_addr(cp);
return ntohl(inet_netof(net));
}